package com.congee02.modelshellmvn.manager.auth;

import com.congee02.modelshellmvn.entity.account.Account;
import org.springframework.stereotype.Component;

@Component
public class AuthManager {

    public boolean canOperate(Account account, int operationRole) {
        int accountRole = account == null ? 0 : account.getRole();
        return (accountRole & operationRole) == operationRole;
    }

}
